<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  

  
  <title>Centos7-Minimal安装 | Huafeihua</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="#1.安装后查看网络情况ifconfig如果没此命令yum provides ifconfig # 查看哪个包有此命令net-tools 安装yum install net-tools #2. 查看网卡起用情况nmtuitab 选择 空格 确认service Network restart #重启服务ip aip address #3.安装桌面yum install “GNOME Desktop”">
<meta name="keywords" content="centos">
<meta property="og:type" content="article">
<meta property="og:title" content="Centos7-Minimal安装">
<meta property="og:url" content="http://malone00.gitee.io/huafeihua/2019/01/22/Test/index.html">
<meta property="og:site_name" content="Huafeihua">
<meta property="og:description" content="#1.安装后查看网络情况ifconfig如果没此命令yum provides ifconfig # 查看哪个包有此命令net-tools 安装yum install net-tools #2. 查看网卡起用情况nmtuitab 选择 空格 确认service Network restart #重启服务ip aip address #3.安装桌面yum install “GNOME Desktop”">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-01-22T07:02:48.636Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Centos7-Minimal安装">
<meta name="twitter:description" content="#1.安装后查看网络情况ifconfig如果没此命令yum provides ifconfig # 查看哪个包有此命令net-tools 安装yum install net-tools #2. 查看网卡起用情况nmtuitab 选择 空格 确认service Network restart #重启服务ip aip address #3.安装桌面yum install “GNOME Desktop”">
  
    <link rel="alternate" href="/huafeihua/atom.xml" title="Huafeihua" type="application/atom+xml">
  
  
    <link rel="icon" href="/images/tmp.jpg">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/huafeihua/css/style.css">
  <link rel="stylesheet" href="/huafeihua/css/highlight.css">
</head>
</html>
<body>
  <div id="fullpage" class="mobile-nav-right">
    
      <div id="wrapper" title="图片来自网络">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="/huafeihua/" title="">首页</a>
      
        <a class="nav-item" href="/huafeihua/categories" title="">分类</a>
      
        <a class="nav-item" href="/huafeihua/archives" title="">归档</a>
      
        <a class="nav-item" href="/huafeihua/tags" title="">标签</a>
      
        <a class="nav-item" href="/huafeihua/about" title="">关于</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-left">
        <section id="main"><article id="post-Test" class="article global-container article-type-post" itemscope="" itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 class="article-title" itemprop="name">
      Centos7-Minimal安装
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/huafeihua/2019/01/22/Test/" class="article-date">
  <time datetime="2019-01-22T06:58:59.000Z" itemprop="datePublished">2019-01-22</time>
</a>
    
    
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/huafeihua/tags/centos/">centos</a></li></ul>

  </div>
  
    <span id="busuanzi_container_page_pv">
      本文总阅读量<span id="busuanzi_value_page_pv"></span>次
    </span>
  

  <div class="article-inner">
    
    <div class="article-content article-content-doorframe" itemprop="articleBody">
      
        <p>#1.安装后查看网络情况<br>ifconfig<br>如果没此命令<br>yum provides ifconfig # 查看哪个包有此命令<br>net-tools 安装<br>yum install net-tools</p>
<p>#2. 查看网卡起用情况<br>nmtui<br>tab 选择 空格 确认<br>service Network restart #重启服务<br>ip a<br>ip address</p>
<p>#3.安装桌面<br>yum install “GNOME Desktop”  比较大</p>
<p>启动 startx</p>
<p>vi /etc/inittab<br>文档说明用以下方式</p>
<h1 id="systemctl-get-default"><a href="#systemctl-get-default" class="headerlink" title="systemctl get-default"></a>systemctl get-default</h1><h1 id="systemctl-set-default-multi-user-target"><a href="#systemctl-set-default-multi-user-target" class="headerlink" title="systemctl set-default multi-user.target"></a>systemctl set-default multi-user.target</h1><h1 id="systemctl-set-default-graphical-target"><a href="#systemctl-set-default-graphical-target" class="headerlink" title="systemctl set-default graphical.target"></a>systemctl set-default graphical.target</h1><p>#4.管理git</p>
<h3 id="安装配置管理Git"><a href="#安装配置管理Git" class="headerlink" title="安装配置管理Git"></a>安装配置管理Git</h3><h3 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h3><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"># yum install git</span><br></pre></td></tr></table></figure></div>
<h4 id="git-config"><a href="#git-config" class="headerlink" title="git config"></a>git config</h4><p>安装完需要用<code>git config</code>配置user name和user email，否则不能commit。</p>
<div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ git config --global user.email &quot;you@example.com&quot;</span><br><span class="line">$ git config --global user.name &quot;Your Name&quot;</span><br><span class="line">$ git config --list</span><br></pre></td></tr></table></figure></div>
<p><code>git config</code>有3种选项，对应不同配置文件。</p>
<ol>
<li>–system /etc/gitconfig</li>
<li>–global ~/.gitconfig</li>
<li>no option .git/config</li>
</ol>
<h4 id="SSH-KEY"><a href="#SSH-KEY" class="headerlink" title="SSH KEY"></a>SSH KEY</h4><p>为了使用GitHub的SSH keys功能，利用<code>ssh-keygen</code>工具在本地生成rsa密钥对。</p>
<div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ ssh-keygen -t rsa -C &quot;your_email@example.com&quot; // generate a rsa key pair in the file ~/.ssh/id_rsa &amp; ~/.ssh/id_rsa.pub</span><br><span class="line">$ ssh-keygen -p //adding or changing a passphrase</span><br></pre></td></tr></table></figure></div>
<h4 id="gitignore"><a href="#gitignore" class="headerlink" title=".gitignore"></a>.gitignore</h4><p>各种类型的gitignore模板<code>https://github.com/github/gitignore</code>。</p>
<div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"># 此为注释</span><br><span class="line">*.a 忽略所有目录下.a结尾的文档</span><br><span class="line">!lib.a 但不忽略lib.a文档</span><br><span class="line">*.[oa] 忽略所有目录下.a或.o结尾的文档</span><br><span class="line">*~ 忽略所有目录下~结尾的文档</span><br><span class="line">TODO 忽略所有目录下的TODO文档</span><br><span class="line">/TODO 仅仅忽略根目录下的TODO文档</span><br><span class="line">build/ 忽略所有目录下的build文件夹</span><br><span class="line">/build/ 仅仅忽略根目录下的build文件夹</span><br><span class="line">doc/**/*.txt 忽略doc文件夹下的所有.txt文档</span><br><span class="line">星号*匹配零个或多个任意字符</span><br><span class="line">[abc] 匹配任何一个列在方括号中的字符（这个例子要么匹配一个 a，要么匹配一个 b，要么匹配一个 c）</span><br><span class="line">问号?只匹配一个任意字符</span><br><span class="line">如果在方括号中使用短划线分隔两个字符，表示所有在这两个字符范围内的都可以匹配，比如 [0-9] 表示匹配所有 0 到 9 的数字</span><br></pre></td></tr></table></figure></div>
<h4 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h4><div class="highlight-box" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" contenteditable="true" data-rel="PLAIN"><figure class="iseeu highlight /plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">$ git init</span><br><span class="line">$ git add *</span><br><span class="line">$ git commit -m &apos;message&apos;</span><br><span class="line"></span><br><span class="line">$ git status</span><br><span class="line">$ git status -s</span><br><span class="line">$ git status --short</span><br><span class="line"></span><br><span class="line">$ git diff</span><br><span class="line"></span><br><span class="line">$ git clone git@github.com:who/whatrepo.git</span><br><span class="line">$ git clone https://github.com/who/whatrepo</span><br><span class="line">$ git clone https://github.com/who/whatrepo SpecifiedFolder</span><br><span class="line"></span><br><span class="line">$ git remote</span><br><span class="line">$ git remote -v</span><br><span class="line">$ git remote add [shortname] [url]</span><br><span class="line">$ git remote rm [remote-name]</span><br><span class="line">$ git remote rename [old-name] [new-name]</span><br><span class="line">$ git remote fetch [remote-name]</span><br><span class="line">$ git push [remote-name] [branch-name]</span><br><span class="line">$ git pull</span><br></pre></td></tr></table></figure></div>
<p>#5.管理yum 源<br>默认yum源(软件仓库):base+extras+updates<br>国内yum源<a href="http://mirrors.aliyun.com/help/centos" target="_blank" rel="noopener">http://mirrors.aliyun.com/help/centos</a><br>扩展yum源:<br>    方法一: 通过访问阿里yum源镜像地址获取.<br>    方法二:直接安装epel源方式:yum install epel-release</p>
<p>#6 安装pip<br>默认yum中可能没有<br>安装epel后再试<br>yum install python-pip  成功</p>

      
    </div>
    
      <footer class="article-footer">
        完
      </footer>
    
  </div>
  
    
<nav id="article-nav">
  <div class="article-nav-block">
    
      <a href="/huafeihua/2019/01/22/Linux-添加权限/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption"></strong>
        <div class="article-nav-title">
          
            Linux 添加权限
          
        </div>
      </a>
    
  </div>
  <div class="article-nav-block">
    
      <a href="/huafeihua/2019/01/22/flask/Flask简单数据处理（编辑数据）/" id="article-nav-older" class="article-nav-link-wrap">
        <div class="article-nav-title">flask-数据处理（编辑数据）</div>
        <strong class="article-nav-caption"></strong>
      </a>
    
  </div>
</nav>

    
<div id="gitmentContainer"></div>
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
<script>
var gitment = new Gitment({
  owner: 'malone00',
  repo: 'https://gitee.com/malone00/huafeihua.git',
  oauth: {
    client_id: '61b3470a9440579b58b3',
    client_secret: '889ecdcc18f7687dd9f5b36feb85080baf8a6c48',
  },
})
gitment.render('gitmentContainer')
</script>

  
  
</article>
</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box">
    <img class="avatar" src="/huafeihua/images/default-avatar.jpeg" title="图片来自网络">
    <h3 class="avatar-name">
      
        听风看雨
      
    </h3>
    <p class="avatar-slogan">
      抗揍的愤青，半个IT男。
    </p>
  </div>
</div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/Linux/">Linux</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/python/">python</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/入坑/">入坑</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/技巧/">技巧</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/自动化/">自动化</a></li><li class="category-list-item"><a class="category-list-link" href="/huafeihua/categories/项目管理/">项目管理</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">标签</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Appium/">Appium</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Docker/">Docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Jenkins/">Jenkins</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Nginx/">Nginx</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Selenium/">Selenium</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/Ubuntu/">Ubuntu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/centos/">centos</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/flask/">flask</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/rabbit/">rabbit</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/sql/">sql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/ubuntu/">ubuntu</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/效率/">效率</a></li><li class="tag-list-item"><a class="tag-list-link" href="/huafeihua/tags/爬虫/">爬虫</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/huafeihua/tags/Appium/" style="font-size: 10px;">Appium</a> <a href="/huafeihua/tags/Docker/" style="font-size: 13.33px;">Docker</a> <a href="/huafeihua/tags/Jenkins/" style="font-size: 10px;">Jenkins</a> <a href="/huafeihua/tags/Nginx/" style="font-size: 10px;">Nginx</a> <a href="/huafeihua/tags/Selenium/" style="font-size: 13.33px;">Selenium</a> <a href="/huafeihua/tags/Ubuntu/" style="font-size: 10px;">Ubuntu</a> <a href="/huafeihua/tags/centos/" style="font-size: 16.67px;">centos</a> <a href="/huafeihua/tags/flask/" style="font-size: 20px;">flask</a> <a href="/huafeihua/tags/python/" style="font-size: 20px;">python</a> <a href="/huafeihua/tags/rabbit/" style="font-size: 10px;">rabbit</a> <a href="/huafeihua/tags/sql/" style="font-size: 10px;">sql</a> <a href="/huafeihua/tags/ubuntu/" style="font-size: 10px;">ubuntu</a> <a href="/huafeihua/tags/效率/" style="font-size: 10px;">效率</a> <a href="/huafeihua/tags/爬虫/" style="font-size: 10px;">爬虫</a>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/huafeihua/archives/2019/01/">一月 2019</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/huafeihua/2019/01/29/python-mq/">python rabbitmq</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/python/Unittest/">Python-Unittest</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/项目管理/项目管理2018-07-23/">U项目管理</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/随笔/-Kanboard-安装之Windows/">Kanboard 安装之Windows</a>
          </li>
        
          <li>
            <a href="/huafeihua/2019/01/22/运维部署/单网卡实现内外网访问/">单网卡实现内外网访问</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box global-width">
    &copy; 2019 Edwin Ma &nbsp;&nbsp;
    驱动于 <a href="http://hexo.io/" target="_blank">Hexo</a><br>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
  </div>
</footer>
      <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

<script src="/js/jquery-2.0.3.min.js"></script>

  <link rel="stylesheet" href="/huafeihua/fancybox/jquery.fancybox.css">
  <script src="/huafeihua/fancybox/jquery.fancybox.pack.js"></script>


<script src="/huafeihua/js/script.js"></script>



    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="/huafeihua/" class="mobile-nav-link">首页</a>
  
    <a href="/huafeihua/categories" class="mobile-nav-link">分类</a>
  
    <a href="/huafeihua/archives" class="mobile-nav-link">归档</a>
  
    <a href="/huafeihua/tags" class="mobile-nav-link">标签</a>
  
    <a href="/huafeihua/about" class="mobile-nav-link">关于</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>
</html>